-- @author lixiyong01
-- @date 2023.07.03
-- 任务运行超过6h

use hdp_lbg_supin_zplisting;

insert overwrite table app_zp_rock_task_timeout6h_ticket_2onduty partition (dt=${dateSuffix})
select task_id, task_name, user_oa, user_team_name, start_time, finish_time,
    (unix_timestamp(finish_time) - unix_timestamp(start_time))/60 as used_minute
from hdp_lbg_supin_zplisting.app_zp_rock_task_inst
where dt='${#date(0, 0, -1):yyyyMMdd#}'
and unix_timestamp(finish_time) - unix_timestamp(start_time) > 6*60*60
and type=1 and task_state=400;



